package com.joyintech;

import com.sccba.cipher.properties.SccbaCipherProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class InitCommand implements CommandLineRunner {

    @Value("${joyin.param.properties:/home/finance/etc/sccba.properties}")
    private String properties;

    @Override
    public void run(String... args) throws Exception {
        log.info("启动初始化");
        log.info("加载配置文件路径-->{}",properties);
        SccbaCipherProperties.getInstance().init(properties);

    }
}
